package com.zxy.demo.junit.runners;

import org.junit.experimental.theories.ParameterSignature;
import org.junit.experimental.theories.ParameterSupplier;
import org.junit.experimental.theories.PotentialAssignment;

import java.util.Arrays;
import java.util.List;

/**
 * AgeSupplier.
 * 
 * Created by zxybird on 17/5/15.
 */
public class AgeSupplier extends ParameterSupplier {

  @Override
  public List<PotentialAssignment> getValueSources(ParameterSignature sig) {
    PotentialAssignment ageAssignment1 = PotentialAssignment.forValue("age", 10);
    PotentialAssignment ageAssignment2 = PotentialAssignment.forValue("age", 20);
    return Arrays.asList(new PotentialAssignment[] { ageAssignment1, ageAssignment2 });
  }
}
